<?php

namespace app\admin\validate;

use think\Validate;
use app\admin\model\PermissionCategory AS CategoryModel;

class PermissionCategory extends Validate
{
    protected $rule = [
        'name|分组名称' => 'require|length:1,50|unique:permission_category',
        'description|分组描述' => 'length:1,200',
        'status|状态' => 'in:' . CategoryModel::STATUS_ENABLED . ',' . CategoryModel::STATUS_DISABLED,
    ];
}